<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>时间线记录内存变化</title>
</head>
<body>
    <button id="btn">add</button>
</body>
<script>
    const btn = document.getElementById('btn');
    const arrlist = [];
    btn.onclick = function() {
        for (let i = 0; i < 10000; i++) {
            document.body.appendChild(document.createElement('p'))
        }
        arrlist.push(new Array(100000).join('x'));
    };
</script>
</html>